package com.example.anydo.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

public class SynchronizeBodyBean implements Serializable {

    int code;
    String message;
    DataBean data;

    // 同步数据库表，对象为 null 或者 属性为 null 表示不需要同步
    public static class DataBean{
        UserBean.DataBean user;

        ArrayList<TaskBean.DataBean> tasks;
        ArrayList<String> tasksCrud; // 对task的操作（增删改查）

        ArrayList<SubTaskBean.DataBean> subTasks;
        ArrayList<String> subTaskCrud; // 对subTask的操作（增删改查）

        public ArrayList<TaskBean.DataBean> getTasks() {
            return tasks;
        }

        public void setTasks(ArrayList<TaskBean.DataBean> tasks) {
            this.tasks = tasks;
        }

        public ArrayList<String> getTasksCrud() {
            return tasksCrud;
        }

        public void setTasksCrud(ArrayList<String> tasksCrud) {
            this.tasksCrud = tasksCrud;
        }

        public UserBean.DataBean getUser() {
            return user;
        }

        public void setUser(UserBean.DataBean user) {
            this.user = user;
        }


        public ArrayList<SubTaskBean.DataBean> getSubTasks() {
            return subTasks;
        }

        public void setSubTasks(ArrayList<SubTaskBean.DataBean> subTasks) {
            this.subTasks = subTasks;
        }

        public ArrayList<String> getSubTaskCrud() {
            return subTaskCrud;
        }

        public void setSubTaskCrud(ArrayList<String> subTaskCrud) {
            this.subTaskCrud = subTaskCrud;
        }

        @Override
        public String toString() {
            return "\nDataBean{" +
                    "\nuser=" + user +
                    "\n, tasks=" + tasks +
                    "\n, tasksCrud=" + tasksCrud +
                    "\n, subTasks=" + subTasks +
                    "\n, subTaskCrud=" + subTaskCrud +
                    '}';
        }
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "SynchronizeBodyBean{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }
}
